<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>手风琴效果</title>
    <script src="jquery.min.js"></script>
    <style>
        .box{
            width: 1000px;
            height: 100px;
            border: 1px solid salmon;
            margin: 100px auto;
        }
        ul{
            overflow: hidden;
            list-style: none;
            margin: 0;
            padding: 0;
        }
        li{
            float: left;
            width: 100px;
            height: 100px;
            background: gold;
            border-right: 2px solid white;
        }
    </style>
</head>
<body>
    <div class="box">
        <ul>
            <li style="width: 200px;"><img src="0.jpg" alt="" width="200px"></li>
            <li style="width: 100px;"><img src="1.jpeg" alt="" width="100px"></li>
            <li style="width: 100px;"><img src="2.jpg" alt="" width="100px"></li>
            <li style="width: 100px;"><img src="3.jpg" alt="" width="100px"></li>
        </ul>
    </div>

    <script>
        $(function(){
            $('li').hover(function(){
                $(this).stop().animate({
                    width: "200px",
                    // opacity: 0.5,
                },500);
                // $(this).siblings().stop().css('opacity',1);
                $(this).siblings().stop().css('width',100);
            });
        })
    </script>
</body>
</html>